Other Classes
The following classes are available globally.
-
An
MGLStyleValue
object is a generic container for a style attribute value. The layout and paint attribute properties ofMGLStyleLayer
can be set toMGLStyleValue
objects.The
MGLStyleValue
class itself represents a class cluster. Under the hood, a particularMGLStyleValue
object may be either anMGLStyleConstantValue
to represent a constant value or anMGLStyleFunction
to represent a value function. Do not initialize anMGLStyleValue
object directly; instead, use one of the class factory methods to create anMGLStyleValue
object.The
MGLStyleValue
class takes a generic parameterT
that indicates the Foundation class being wrapped by this class. Common values forT
include:- `NSNumber` (for Boolean values, floating-point numbers, and enumerations)
- `NSValue` (for `CGVector`, `NSEdgeInset`, and `UIEdgeInset`s)
- `NSString`
- `NSColor` or `UIColor`
- `NSArray`
Declaration
Objective-C
@interface MGLStyleValue <T> : NSObject
Swift
class MGLStyleValue
-
An
MGLStyleConstantValue
object is a generic container for a style attribute value that remains constant as the zoom level changes. The layout and paint attribute properties ofMGLStyleLayer
objects can be set toMGLStyleConstantValue
objects.The
See moreMGLStyleConstantValue
class takes a generic parameterT
that indicates the Foundation class being wrapped by this class.Declaration
Objective-C
@interface MGLStyleConstantValue <T> : MGLStyleValue
Swift
class MGLStyleConstantValue
-
An
MGLStyleFunction
is a value function defining a style value that changes as the zoom level changes. The layout and paint attribute properties of anMGLStyleLayer
object can be set toMGLStyleFunction
objects. Use a zoom level function to create the illusion of depth and control data density.The
See moreMGLStyleFunction
class takes a generic parameterT
that indicates the Foundation class being wrapped by this class.Declaration
Objective-C
@interface MGLStyleFunction <T> : MGLStyleValue
Swift
class MGLStyleFunction